<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNewsMessagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('news_messages', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->charset = 'utf8mb4';
            $table->comment = '首页快讯消息表';
            $table->increments('id');
            $table->text('content')->default('')->comment('快讯内容');
            $table->tinyInteger('is_show')->default(2)->comment('是否展示 1展示 2不展示');
            $table->string('admin_user',50)->default('')->comment('管理员');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('news_messages');
    }
}
